import { TABLE_COLUMN_TYPE } from "@/components/SystemTable/data";
import { parseTime } from "@/utils/ruoyi";

export const postTableOpt = [
  {
    label: "岗位编号",
    prop: "postId",
  },
  {
    label: "岗位名称",
    prop: "postName",
  },
  {
    label: "岗位排序",
    prop: "postSort",
  },
  {
    label: "状态",
    prop: "status",
    type: TABLE_COLUMN_TYPE.DICT_TAG,
    dictName: "sys_normal_disable",
  },
  {
    label: "创建时间",
    prop: "createTime",
    type: TABLE_COLUMN_TYPE.TIME,
    filter: (rowData) => {
      return parseTime(rowData);
    },
    width: "180",
  },
];

export const postTableAuth = {
  edit: ["system:post:edit"],
  del: ["system:post:remove"],
};
